<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 
<%@ page import="bean.User" %>
<%@ page import="dao.UserDao" %> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% String username=(String) request.getSession().getAttribute("userName"); %>
<script>
   function check_pwd(){
	   var password=document.getElementById('TxtPassWord').value;
	   if(password==""){
		   
		   alert("密码不能为空！");
	   		return false;
		   
	   }
   }
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="<%=request.getContextPath() %>/css/SonPage.css" rel="stylesheet" type="text/css">
    <link href="<%=request.getContextPath() %>/css/Element.css" rel="stylesheet" type="text/css">

    <script src="<%=request.getContextPath() %>/js/Mtopt_1.1.js" type="text/javascript"></script>
    <script src="<%=request.getContextPath() %>/js/jquery-1.8.3.js" type="text/javascript"></script>
    <link href="<%=request.getContextPath() %>/css/ModitySafeQuestion.html.css" rel="stylesheet" type="text/css">
</head>
<body>  
 <%  UserDao udao=new UserDao();
     User user=udao.findByName(username);
     int id=user.getId();
     %>
<div class="DivForm"> 
    <form action="<%=request.getContextPath()%>/ChangeSafeServlet" method="post" onsubmit="return check_pwd()">
    <div style=" padding-left:10px; width:100%; text-align:left;">
        <label class="LabelMain" style="font-size:22px;">修改安全问题</label>
    </div>    
    <div id="DivWindow" class="DivWindow">
        <table class="Table">
          <tbody>
            <tr>
                <td><input type="hidden" id="id" name="id" value="<%=id%>"></td>
            </tr>
            <tr>
                <td>账户:</td>
                <td colspan="2">
                    <input id="TxtUid" name="TxtUid" type="text" class="TextMain" style="width: 150px;" value="<%=username %>">
                </td>
            </tr>
            <tr>
                <td>密码:</td>
                <td colspan="2">
                    <input id="TxtPassWord" name="TxtPassWord" type="password" class="TextDefault" style="width: 150px;">
                </td>
            </tr>
            <tr>
                <td>新问题:</td>
                <td colspan="2">
                     <select class="SelectDefault" name="D1" id="D1"style="width:200px;">
					     <option value="你最信赖的人是谁？">你最信赖的人是谁？</option><option value="你最喜欢的食物是？">你最喜欢的食物是？</option>
					     <option value="对你影响最大的人是？">对你影响最大的人是？</option><option value="你最喜欢去的城市是？">你最喜欢去的城市是？</option>
					     <option value="你最喜欢的一本书是？">你最喜欢的一本书是？</option><option value="你最喜欢的电影是？">你最喜欢的电影是？</option>
					 </select>
			    </td>
            </tr>
            <tr>
                <td>新答案:</td>
                <td colspan="2">
                    <input id="TxtNewAnswer" name="TxtNewAnswer" type="text" class="TextDefault" style="width: 150px;">
                </td>
            </tr>
            <tr>
                <td>新提示:</td>
                <td colspan="2">
                    <input id="TxtNewAnswerTip" name="TxtNewAnswerTip" type="text" class="TextDefault" style="width: 150px;">
                </td>
            </tr>
            <tr>
                <td>验证码:</td>
                <td style="width: 60px;">
                    <input id="TxtIdentifying" name="TxtIdentifying" maxlength="5" type="text" class="TextDefault" style="width: 80px;">
                </td>
                <td>
                    <img alt="" id="Identifying" src="../GetIdentifyingCode.ashx" title="更换验证码" onclick="RefreshIdentifying();" style="cursor:pointer;"></td>
            </tr>
            <tr>
                <td>
                    <button id="BtnModity" name="BtnModity" type="submit" value="立即修改" class="ButtonMain" style="width: 100px;" >立即修改</button>    
                </td>    
                <td>
                    <button id="BtnClear" name="BtnClear" type="reset" value="清空" class="ButtonDefault" style="width: 50px;">清空</button>
                </td>
            </tr>
        </tbody>
      </table>
    </div>
 </form>
</div>
    <script src="<%=request.getContextPath() %>/ModitySafeQuestion.html.js" type="text/javascript"></script>
</body>
</html>